package com.bruce.practice.json;

import org.json.JSONException;
import org.skyscreamer.jsonassert.JSONAssert;

/**
 * @author luotuan
 * @Description
 * @create 2020-09-10 14:12
 **/
public class JsonCompare {
    public static void main(String[] args) throws JSONException {
        String expected = "{id:1,name:\"Joe\",friends:[{id:2,name:\"Pat\",pets:[\"dog\"]},{id:3,name:\"Sue\",pets:[\"bird\",\"fish\"]}],pets:[]}";
        String actual = "{id:1,name:\"Joe\",friends:[{id:2,name:\"Pat\",pets:[\"dog\"]},{id:3,name:\"Sue\",pets:[\"cat\",\"fish\"]}],pets:[]}";
        JSONAssert.assertEquals(expected, actual, false);
    }
}
